<!DOCTYPE HTML>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.w3.org/1999/xhtml">
<meta charset="utf-8">
<head th:include="include :: header"></head>
<link th:href="@{/ajax/libs/iCheck/custom.css}" rel="stylesheet"/>

<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
    <form class="form-horizontal m" id="formId" th:object="${Form}">
        <input id="id" name="id" class="form-control" th:value="*{id}" type="hidden">
        <input  class="form-control" th:value="*{procInstanId}" type="hidden">
        <input id="id" name="taskId" class="form-control" type="hidden" th:value="${taskId}">
        <div class="form-group">
            <label class="col-sm-3 control-label">标题：</label>
            <div class="col-sm-8 form-control-static" th:text="*{title}">
            </div>
        </div>

        <div class="form-group">
            <label class="col-sm-3 control-label">类型：</label>
            <div class="col-sm-8 form-control-static" th:text="*{leaveType}">
            </div>
        </div>



        <div class="form-group">
            <label class="col-sm-3 control-label">结束时间：</label>
            <div class="col-sm-8 form-control-static" th:text="*{#dates.format(leaveTime,'yyyy-MM-DD HH:mm:ss')}">
            </div>
        </div>

        <div class="form-group">
            <label class="col-sm-3 control-label">起效时间：</label>
            <div class="col-sm-8 form-control-static" th:text="*{#dates.format(expireTime,'yyyy-MM-DD HH:mm:ss')}">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">理由：</label>
            <div class="col-sm-8 form-control-static"  th:text="*{leaveContent}" >
            </div>
        </div>

        <div class="form-group">
            <label class="col-sm-3 control-label">状态：</label>
            <div class="col-sm-8">
                <label class="checkbox-inline i-checks">
                    <span th:if="*{status} eq '1' " class="btn btn-warning btn-xs ">预约中</span>
                    <span th:if="*{status} eq '2' " class="btn btn-success btn-xs ">同意</span>
                    <span th:if="*{status} eq '3' " class="btn btn-danger btn-xs ">拒绝</span>
                </label>
            </div>
        </div>
        <!--<div class="form-group">-->
            <!--<label class="col-sm-3 control-label">选择下一个审批人：</label>-->
            <!--<div class="col-sm-8">-->
                <!--&lt;!&ndash;<input name="roomName" type="text" th:value="${roomName}"  class="form-control"/>&ndash;&gt;-->
                <!--<select name="agent_Id" class="form-control select2-hidden-accessible">-->
                    <!--<option value=""></option>-->
                    <!--<option th:each="user:${users}" th:value="${user.uid}" th:text="${user.name}"></option>-->
                <!--</select>-->
            <!--</div>-->
        <!--</div>-->
        <div class="form-group">
            <label class="col-sm-3 control-label">回复：</label>
            <div class="col-sm-8 form-control-static"  th:text="*{reply}" >

            </div>
        </div>


        <!--<div class="form-group">-->
            <!--<label class="col-sm-3 control-label">状态：</label>-->
            <!--<div class="col-sm-8">-->
                <!--<label class="checkbox-inline i-checks">-->
                    <!--<input type="radio" name="status" value="2" checked/>-->
                    <!--同意-->
                <!--</label>-->
                <!--<label class="checkbox-inline i-checks">-->
                    <!--<input type="radio" name="status" value="3"/>-->
                    <!--拒绝-->
                <!--</label>-->
            <!--</div>-->
        <!--</div>-->
        <!--<div class="form-group" shiro:hasPermission="task:update" >-->
            <!--<div class="form-control-static col-sm-offset-9">-->
                <!--<button type="submit" class="btn btn-primary">审批</button>-->
                <!--<button onclick="$.modal.close()" class="btn btn-danger" type="button">关闭</button>-->
            <!--</div>-->
        <!--</div>-->
    </form>
</div>
<div th:include="include::footer"></div>
<script th:src="@{/ajax/libs/select/select2.js}"></script>
<script type="text/javascript">

    var prefix = "/task";
    $("#formId").validate({
        rules:{
            agent_Id:{
                required:true,
            },
        },
        submitHandler: function(form) {
            $.operate.save(prefix + "/LeaveApproval", $('#formId').serialize());
        }
    });
</script>
</body>
</html>
